This showed up as a test failure when we get NULL as
selected item and then try to unref it. Luckily
get_selected_item is transfer none, so we don't have
to worry about it.
GParamSpec *pspec,
GtkFileChooserWidget *impl)
{
- gint new_index;
GtkFileFilter *new_filter;
- new_index = gtk_drop_down_get_selected (dropdown);
- new_filter = g_list_model_get_item (G_LIST_MODEL (impl->filters), new_index);
- set_current_filter (impl, new_filter);
+ new_filter = gtk_drop_down_get_selected_item (dropdown);
if (impl->location_entry != NULL)
_gtk_file_chooser_entry_set_file_filter (GTK_FILE_CHOOSER_ENTRY (impl->location_entry),
new_filter);
- g_object_unref (new_filter);
}
static gboolean